package net.dodoman.interfacemore;

public class DateObj {
	private String name;
	private int age;
	private boolean sex;
	private int id;
	public static int personID;
	static {
		personID = 1000;
	}

	public DateObj(String na, int ag, boolean sx) {
		name = na;
		age = ag;
		sex = sx;
		id = DateObj.personID++;
	}

	public DateObj(String na, int ag) {
		name = na;
		age = ag;
		sex = true;
		id = DateObj.personID++;
	}

	public int getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	public void setName(String na) {
		name = na;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int dg) {
		age = dg;
	}

	public boolean isSex() {
		return this.sex;
	}

	public void setSex(boolean sx) {
		sex = sx;
	}

	public String toString() {
		return "" + id + "-" + name + "-" + age + "-" + sex;
	}
}
